package com.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name="tb_receipt_details")
public class ReceiptDetailsBean implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3306672624636539358L;
	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String id;
	private String assets_number;
	private String assets_money;//设备单价
	private String assets_name;//名称
	private String assets_specification;//设备规格
	private Integer assets_num;//数量
	private String assets_class_name;//设备类别
	@Transient
	private String assets_id;
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="receipt_id")//加入一列作为外键
	private ReceiptBean receipt_id;
	/*
	 * 借出 
	 */
	private String forecast_date;//预计归还时间
	/*
	 * 盘点
	 */
	private String assets_status;// 资产状态
	private String  use_dept_name; 	//使用部门  or 调拨单的原使用部门 or 退库单的使用部门
	private Integer real_num;	//实际数量
	private Integer difference;//差异
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getAssets_id() {
		return assets_id;
	}
	public void setAssets_id(String assets_id) {
		this.assets_id = assets_id;
	}
	public String getAssets_money() {
		return assets_money;
	}
	public void setAssets_money(String assets_money) {
		this.assets_money = assets_money;
	}
	public String getAssets_name() {
		return assets_name;
	}
	public void setAssets_name(String assets_name) {
		this.assets_name = assets_name;
	}
	public String getAssets_specification() {
		return assets_specification;
	}
	public void setAssets_specification(String assets_specification) {
		this.assets_specification = assets_specification;
	}
	public Integer getAssets_num() {
		return assets_num;
	}
	public void setAssets_num(Integer assets_num) {
		this.assets_num = assets_num;
	}
	public ReceiptBean getReceipt_id() {
		return receipt_id;
	}
	public void setReceipt_id(ReceiptBean receipt_id) {
		this.receipt_id = receipt_id;
	}
	public String getAssets_number() {
		return assets_number;
	}
	public void setAssets_number(String assets_number) {
		this.assets_number = assets_number;
	}
	public String getAssets_status() {
		return assets_status;
	}
	public void setAssets_status(String assets_status) {
		this.assets_status = assets_status;
	}
	
	public String getUse_dept_name() {
		return use_dept_name;
	}
	public void setUse_dept_name(String use_dept_name) {
		this.use_dept_name = use_dept_name;
	}
	public Integer getReal_num() {
		return real_num;
	}
	public void setReal_num(Integer real_num) {
		this.real_num = real_num;
	}
	public Integer getDifference() {
		return difference;
	}
	public void setDifference(Integer difference) {
		this.difference = difference;
	}
	public String getAssets_class_name() {
		return assets_class_name;
	}
	public void setAssets_class_name(String assets_class_name) {
		this.assets_class_name = assets_class_name;
	}
	public String getForecast_date() {
		return forecast_date;
	}
	public void setForecast_date(String forecast_date) {
		this.forecast_date = forecast_date;
	}
	
}
